<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <base href="<%=basePath%>">
    <title>我的二维码</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="wap-font-scale" content="no">
	<!-- 公用样式css -->
	<link href="css/base.css" rel="stylesheet" type="text/css" />
	<link href="css/interests-member.css" rel="stylesheet" type="text/css" />
	<link href="css/supplement.css" rel="stylesheet" type="text/css" />
	<link href="css/weui.min.css" rel="stylesheet" type="text/css" />
	<link href="css/jquery-weui.min.css" rel="stylesheet" type="text/css" />
	<style>
		#shareit {
		  -webkit-user-select: none;
		  display: none;
		  position: absolute;
		  width: 100%;
		  height: 100%;
		  background: rgba(0,0,0,0.85);
		  text-align: center;
		  top: 0;
		  left: 0;
		  z-index: 105;
		}
		#shareit img {
		  max-width: 100%;
		}
		.arrow {
		  position: absolute;
		  right: 2%;
		  top: 2%;
		}
	</style>
	
	
</head>

<body>
<!-- <header class="header">
    <div class="header-center word5 "><a class="header-arrow">我的二维码</a></div>
</header> -->
<div id="shareit">
  <img class="arrow" src="images/guide1.png">
</div>

<div id="web_bg" style="position:absolute; width:100%; height:100%; z-index:-1">
    <img style="position:fixed;" src="images/ewmpic.jpg" height="100%" width="100%"/>
</div>
<div class="main">
	<div class="head-portrait">
		<img class="portrait-img" src="${userImg}" width="100" height="100" onerror="this.src='images/headimg.jpg'"/>
		<p style="font-size:15px;color: #fff;margin-top:10px;">邀请人：${userName}</p>
	</div>
	<div style="width:100%;text-align:center;">
		<img style="width:70%" src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=${useCode}" /> <!-- onerror="this.src='images/ewmpic2.jpg'" -->
	</div>
	<div style="width:70%;margin-left: 15%;margin-top:25px;">
		<a href="#" class="weui-btn  weui-btn_primary order" onclick="shareWX();return false;">邀请</a>
	</div>
</div>
<!-- footer -->
<footer class="footer1">
	<div class="weui-tabbar">
        <a href="home/index" class="weui-tabbar__item">
          <div class="weui-tabbar__icon">
            <img src="images/icon/home.png" alt="">
          </div>
          <p class="weui-tabbar__label">酒店预订</p>
        </a>
        <a href="member/getMemQRCode" class="weui-tabbar__item weui-bar__item--on">
          <div class="weui-tabbar__icon">
            <img src="images/icon/code-sel.png" alt="">
          </div>
          <p class="weui-tabbar__label">我的二维码</p>
        </a>
        <a href="order/getAllOrderList?ordState=1000" class="weui-tabbar__item">
          <div class="weui-tabbar__icon">
            <img src="images/icon/order.png" alt="">
          </div>
          <p class="weui-tabbar__label">我的订单</p>
        </a>
        <a href="member/memberCenter" class="weui-tabbar__item">
          <div class="weui-tabbar__icon">
            <img src="images/icon/user.png" alt="">
          </div>
          <p class="weui-tabbar__label">个人中心</p>
        </a>
      </div>
</footer>
<script type="text/javascript" src="js/jquery/jquery.js" ></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		wx.config({
			debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
			appId: '${wxMap.appId}', // 必填，公众号的唯一标识
			timestamp: '${wxMap.timestamp}' , // 必填，生成签名的时间戳
			nonceStr: '${wxMap.nonceStr}', // 必填，生成签名的随机串
			signature: '${wxMap.signature}',// 必填，签名
			jsApiList: [
				  "updateTimelineShareData", 
	              "updateAppMessageShareData"
			]
		});
		
		wx.ready(function(){
			 var shareData = {
	             title:'雅客小镇',  //标题
	             link: '${link}', //链接地址
	             desc: 'Yake Xiaozhen Holiday Hotel',
	             imgUrl: '<%=basePath%>images/icon/code-sel.png'
	         };
	         wx.updateTimelineShareData(shareData);
	         wx.updateAppMessageShareData(shareData);
         });
         
        $("#shareit").on("click", function(){
		    $("#shareit").hide(); 
		})
	});
	function shareWX(){
		$("#shareit").show();
	}
</script>
</body>
</html>
